/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.mzk.kramerius.articles.importFromLn.cli;

import cz.mzk.kramerius.articles.importFromLn.krameriusAccess.Repository;
import cz.mzk.kramerius.commons.PropertyLoader;
import org.dom4j.Document;

/**
 *
 * @author Martin Řehánek (rehan@mzk.cz)
 */
class PrintRepositoryErrorsAction implements Action {

    private final Document errors;

    public PrintRepositoryErrorsAction(PropertyLoader properties) {
        errors = Repository.instanceOf(properties).getErrorsInRepository();
    }

    @Override
    public void run() {
        System.out.println("Errors found in repository: ");
        System.out.println(errors.asXML());
    }
}
